From: Claudio Cambra Date: Mon, 25 Nov 2024 08:42:39 +0000 (+0800) Subject: Use Style.darkMode instead of Theme.darkMode X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~30^2^2~226^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=84fb45a9365c6f5080a9c18fe871fd4d0b93ab71;p=nextcloud-desktop.git Use Style.darkMode instead of Theme.darkMode This way we avoid the computation that happens in Theme::darkMode each time the property is accessed Signed-off-by: Claudio Cambra --- diff --git a/src/gui/tray/ActivityItemContent.qml b/src/gui/tray/ActivityItemContent.qml index cc56103e4..98ea3c227 100644 --- a/src/gui/tray/ActivityItemContent.qml +++ b/src/gui/tray/ActivityItemContent.qml @@ -104,7 +104,7 @@ RowLayout { cache: true fillMode: Image.PreserveAspectFit - source: Theme.darkMode ? model.darkIcon : model.lightIcon + source: Style.darkMode ? model.darkIcon : model.lightIcon sourceSize.height: 64 sourceSize.width: 64 mipmap: true // Addresses grainy downscale diff --git a/src/gui/tray/CallNotificationDialog.qml b/src/gui/tray/CallNotificationDialog.qml index 22f11da71..3ebe3bd65 100644 --- a/src/gui/tray/CallNotificationDialog.qml +++ b/src/gui/tray/CallNotificationDialog.qml @@ -163,7 +163,7 @@ ApplicationWindow { cache: true source: root.usingUserAvatar ? root.talkNotificationData.userAvatar : - Theme.darkMode ? root.talkIcon + palette.windowText : root.talkIcon + Style.ncBlue + Style.darkMode ? root.talkIcon + palette.windowText : root.talkIcon + Style.ncBlue sourceSize.width: Style.accountAvatarSize sourceSize.height: Style.accountAvatarSize diff --git a/src/gui/tray/UnifiedSearchResultListItem.qml b/src/gui/tray/UnifiedSearchResultListItem.qml index bc3588e6e..97092b23c 100644 --- a/src/gui/tray/UnifiedSearchResultListItem.qml +++ b/src/gui/tray/UnifiedSearchResultListItem.qml @@ -56,9 +56,9 @@ MouseArea { anchors.fill: parent title: model.resultTitle subline: model.subline - icons: Theme.darkMode ? model.darkIcons : model.lightIcons - iconsIsThumbnail: Theme.darkMode ? model.darkIconsIsThumbnail : model.lightIconsIsThumbnail - iconPlaceholder: Theme.darkMode ? model.darkImagePlaceholder : model.lightImagePlaceholder + icons: Style.darkMode ? model.darkIcons : model.lightIcons + iconsIsThumbnail: Style.darkMode ? model.darkIconsIsThumbnail : model.lightIconsIsThumbnail + iconPlaceholder: Style.darkMode ? model.darkImagePlaceholder : model.lightImagePlaceholder isRounded: model.isRounded && iconsIsThumbnail } } diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 6502817e9..010a9391b 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -41,7 +41,7 @@ AbstractButton { Layout.leftMargin: Style.accountIconsMenuMargin verticalAlignment: Qt.AlignCenter cache: false - source: model.avatar !== "" ? model.avatar : Theme.darkMode ? "image://avatars/fallbackWhite" : "image://avatars/fallbackBlack" + source: model.avatar !== "" ? model.avatar : Style.darkMode ? "image://avatars/fallbackWhite" : "image://avatars/fallbackBlack" Layout.preferredHeight: Style.accountAvatarSize Layout.preferredWidth: Style.accountAvatarSize